<template>
	<view>
		<u-sticky offset-top="0">
			<navBarView title="律师管理" :statusBarHeight="statusBarHeight"></navBarView>
		</u-sticky>
		<view class="headerView">
			<view class="searchView flex-row-flex-start">
				<view class="searchLeft flex-row-flex-start">
					<image class="icon" src="/pageE/static/lawOffice_search.png"></image>
					<input class="msgStr" placeholder="输入律师名称"/>
				</view>
				<view class="searchBtn">
					搜索
				</view>
			</view>
			<view class="criminalTypeView flex-row-center">
				<view @click="caseOrFaPiaoClick(0)" class="criminalTypeItem" style="border-radius: 10rpx 0rpx 0rpx 10rpx;" :style="caseOrFaPiaoIndex==0?'color: #fff;':'color: #333333;background-color: white;'">
					待审核
				</view>
				<view @click="caseOrFaPiaoClick(2)" class="criminalTypeItem" style="border-radius: 0rpx 10rpx 10rpx 0rpx;" :style="caseOrFaPiaoIndex==2?'color: #fff;':'color: #333333;background-color: white;'">
					律师列表
				</view>
			</view>
		</view>
		<view v-if="caseOrFaPiaoIndex==0" class="listItem flex-row-space-between" v-for="index in 10" :key="index">
			<view class="listItem1 flex-row-flex-start">
				<image class="listItem1a"></image>
				<view class="listItem1b">
					<view class="listItem1b1">
						张主任
					</view>
					<view class="listItem1b2">
						18888888888
					</view>
				</view>
			</view>
			<view class="listItem2 flex-column-flex-end">
				<view class="listItem2a">
					通过
				</view>
				<view class="listItem2b">
					拒绝
				</view>
			</view>
		</view>
		<view v-if="caseOrFaPiaoIndex==2" class="listItem flex-row-space-between" v-for="index in 15" :key="index">
			<view class="listItem1 flex-row-flex-start">
				<image class="listItem1a"></image>
				<view class="listItem1b">
					<view class="listItem1b1">
						张主任
					</view>
					<view class="listItem1b2">
						18888888888
					</view>
				</view>
			</view>
			<view class="listItem2 flex-column-flex-end">
				<view @click.stop="editClick(index)" class="listItem2c">
					编辑
				</view>
				<view @click.stop="unbindingClick(index)" class="listItem2d">
					解绑
				</view>
			</view>
		</view>
		
		<view style="height: 190rpx;"></view>
		<view class="fixed-bottom flex-row-center" style="height: 180rpx;background-color: white;">
			<view @click="addLawyerClick()" class="loginButton2">
				添加
			</view>
		</view>
	</view>
</template>

<script>

	export default {
		
		onShow() {
			let sysInfo = uni.getSystemInfoSync()
			this.statusBarHeight = sysInfo.statusBarHeight; // 状态栏高度
			this.criminalTypeViewTopHeight = 88+15; // case tyep 距离顶部高度
		},
		data() {
			return {
				statusBarHeight: '',// 状态栏高度 
				caseOrFaPiaoIndex:0,
				caseDateTime:'',
				faPiaoDateTime:'',
				
			}
		},
		methods: {
			addLawyerClick(){
				uni.navigateTo({
					url:'/pageE/addLawyer/addLawyer'
				})
			},
			editClick(index){
				uni.navigateTo({
					url:'/pageE/lawyerManagerDetail/lawyerManagerDetail'
				})
			},
			unbindingClick(index){
				uni.showModal({
					title: '确定解绑？',
					content:'删除后需要重新添加',
					// editable:true,
					// placeholderText:'请输入昵称',
					showCancel: 'true',
					cancelText: "取消",
					success: (res) => {
						console.log(res)
						if (res.confirm==true) {//确定
							
						} else{//取消
							
						}
					},
				
				})
			},
			caseDateChange(e){
				this.caseDateTime=e.detail.value
			},
			faPiaoDateChange(e) {
				this.faPiaoDateTime=e.detail.value
			},
			caseOrFaPiaoClick(index){
				this.caseOrFaPiaoIndex = index
			}
		}
	}
</script>

<style>
	.loginButton2 {
		margin-top: 10rpx;
		margin-left: 64rpx;
		width: 620rpx;
		height: 90rpx;
		background: linear-gradient( to bottom, #E93548 0%, #F35B43 100%);
		box-shadow: 0rpx 4rpx 16rpx 0rpx rgba(235,43,59,0.4);
		border-radius: 10rpx 10rpx 10rpx 10rpx;
		font-family: PingFang SC, PingFang SC;
		font-weight: 500;
		font-size: 32rpx;
		color: #FFFFFF;
		line-height: 90rpx;
		text-align: center;
	}
	.listItem2d{
		margin-top: 12rpx;
		width: 134rpx;
		height: 52rpx;
		border-radius: 10rpx 10rpx 10rpx 10rpx;
		border: 2rpx solid #999999;
		font-family: PingFang SC, PingFang SC;
		font-weight: 400;
		font-size: 28rpx;
		color: #999999;
		line-height: 52rpx;
		text-align: center;
	}
	.listItem2c{
		width: 134rpx;
		height: 52rpx;
		border-radius: 10rpx 10rpx 10rpx 10rpx;
		border: 2rpx solid #E93548;
		font-family: PingFang SC, PingFang SC;
		font-weight: 400;
		font-size: 28rpx;
		color: #E93548;
		line-height: 52rpx;
		text-align: center;
	}
	.listItem2a{
		width: 134rpx;
		height: 52rpx;
		border-radius: 10rpx 10rpx 10rpx 10rpx;
		border: 2rpx solid #55CD8C;
		font-family: PingFang SC, PingFang SC;
		font-weight: 400;
		font-size: 28rpx;
		color: #55CD8C;
		line-height: 52rpx;
		text-align: center;
	}
	.listItem2b{
		margin-top: 12rpx;
		width: 134rpx;
		height: 52rpx;
		border-radius: 10rpx 10rpx 10rpx 10rpx;
		border: 2rpx solid #E93548;
		font-family: PingFang SC, PingFang SC;
		font-weight: 400;
		font-size: 28rpx;
		color: #E93548;
		line-height: 52rpx;
		text-align: center;
	}
	.listItem1b2{
		margin-top: 14rpx;
		font-family: PingFang SC, PingFang SC;
		font-weight: 500;
		font-size: 32rpx;
		color: #333333;
	}
	.listItem1b1{
		font-family: PingFang SC, PingFang SC;
		font-weight: 500;
		font-size: 32rpx;
		color: #333333;
	}
	.listItem1b{
		margin-left: 28rpx;
	}
	.listItem1a{
		width: 104rpx;
		height: 104rpx;
		border-radius: 52rpx;
		background-color: #E93548;
	}
	.listItem{
		margin-left: 24rpx;
		margin-top: 24rpx;
		width: 654rpx;
		padding-left: 24rpx;
		padding-right: 24rpx;
		padding-top: 32rpx;
		padding-bottom: 32rpx;
		background: #FFFFFF;
		box-shadow: 0rpx 4rpx 16rpx 0rpx rgba(0,0,0,0.04);
		border-radius: 10rpx 10rpx 10rpx 10rpx;
	}
	.criminalTypeItem{
		margin-left: 1rpx;
		width: 348rpx;
		height: 74rpx;
		font-family: PingFang SC, PingFang SC;
		font-weight: 500;
		font-size: 30rpx;
		line-height: 74rpx;
		text-align: center;
	}
	.criminalTypeView{
		margin-left: 24rpx;
		width: 702rpx;
		height: 80rpx;
		border-radius: 10rpx 10rpx 10rpx 10rpx;
		background: linear-gradient( to bottom, #E93548 0%, #F35B43 100%);
	}
	.searchBtn{
		margin-left: 16rpx;
	}
	.msgStr{
		margin-left: 14rpx;
		width: 530rpx;
	}
	.icon{
		margin-left: 22rpx;
		width: 32rpx;
		height: 32rpx;
	}
	.searchLeft{
		margin-left: 24rpx;
		width: 612rpx;
		height: 80rpx;
		background: #F5F5F5;
		border-radius: 10rpx 10rpx 10rpx 10rpx;
	}
	.searchView{
		width: 750rpx;
		height: 128rpx;
	}
	.headerView{
		width: 750rpx;
		background-color: white;
		padding-bottom: 30rpx;
	}
	page{
		background-color: #FAF7F8;
	}

</style>
